package com.pure.database.objectbox.entity

import io.objectbox.annotation.Entity
import io.objectbox.annotation.Id
import io.objectbox.relation.ToMany
import io.objectbox.relation.ToOne

/**
 * FileName : Order
 * Author : luqihua
 * Date : 2025/3/20
 * Desc :
 **/
@Entity
data class Order(
    @Id
    var id: Long = 0,
    var price: Long = 0,
    var createTime: Long = 0,
    var endTime: Long = 0,
) {
    var foods: ToMany<Food> = ToMany(this, Order_.foods)

    var user: ToOne<User> = ToOne(this, Order_.user)
}
